/**
 * api管理
 */
import request from "../utils/request";

export default {
  login(data) {
    return request({
      url: "/users/login",
      method: 'POST',
      data
    });
  },
  noticeCount() {
    return request({
      url: "/leave/count",
      method: 'GET',
      data: {},
      mock: false
    });
  },
  getMenuList(prams) {
    return request({
      url: "/menu/list",
      method: 'GET',
      data: prams,
      mock: false
    });
  },
  getPermissionList() {
    return request({
      url: "/users/getPermissionList",
      method: 'GET',
      mock: false
    });
  },
  getUserList(prams) {
    return request({
      url: "/users/list",
      method: 'GET',
      data: prams,
      mock: false
    });
  },
  getAllUserList() {
    return request({
      url: "/users/all/list",
      method: 'GET',
      data: {},
      mock: false
    });
  },
  userDel(prams) {
    return request({
      url: "/users/delete",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  getRoleAllList() {
    return request({
      url: "/roles/allList",
      method: 'GET',
      mock: false
    });
  },
  getRoleList(prams) {
    return request({
      url: "/roles/list",
      method: 'GET',
      data: prams,
      mock: false
    });
  },
  getDeptList(prams) {
    return request({
      url: "/dept/list",
      method: 'GET',
      data: prams,
      mock: false
    });
  },
  deptOperate(prams) {
    return request({
      url: "/dept/operate",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  userSubmit(prams) {
    return request({
      url: "/users/operate",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  menuSubmit(prams) {
    return request({
      url: "/menu/operate",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  roleOperate(prams) {
    return request({
      url: "/roles/operate",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  updatePermission(prams) {
    return request({
      url: "/roles/update/permission",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  getApplyList(prams) {
    return request({
      url: "/leave/list",
      method: 'GET',
      data: prams,
      mock: false
    });
  },
  leaveOperate(prams) {
    return request({
      url: "/leave/operate",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
  leaveApprove(prams) {
    return request({
      url: "/leave/approve",
      method: 'POST',
      data: prams,
      mock: false
    });
  },
};
